package secret.santa.client;

import java.util.ArrayList;

import com.google.gwt.user.client.ui.ListBox;

public class NameSelector extends ListBox
{
	public NameSelector() 
	{
		super(true);
		setVisibleItemCount(10);
	}
	
	public String[] getSelectedItems()
	{
		ArrayList<String> temp = new ArrayList<String>();
		
		int size = getItemCount();
		for(int i = 0; i < size; i ++)
		{
			if(isItemSelected(i))
				temp.add(getValue(i));
		}
		return temp.toArray(new String[temp.size()]);
	}


}
